﻿

using System;
using System.Threading.Tasks;
using System.Linq.Expressions;

using Oliving.Edge.Model;
using Oliving.Edge.Model.Dto;
using Oliving.Edge.Model.Models;
using Oliving.Edge.IServices;
using Oliving.Edge.IRepository;
using Oliving.Edge.Services.BASE;
using Oliving.Edge.Model.Dto.User;
using Oliving.Edge.IRepository.User;
using Oliving.Edge.IServices.User;
using Oliving.Edge.Model.Models.User;
using System.Collections.Generic;

namespace Oliving.Edge.Services.User
{
    public partial class Sys_DeptServices : BaseServices<Sys_Dept>, ISys_DeptServices
    {
        ISys_DeptRepository _dal;
        public Sys_DeptServices(ISys_DeptRepository dal)
        {
            this._dal = dal;
            base.BaseDal = dal;
        }



        public async Task<PageModel<Sys_DeptPageDto>> QueryPageList(
            Expression<Func<Sys_Dept, bool>> whereExpression,
            int pageIndex = 1, int pageSize = 20,
            string sortField = null, string sortOrder = null
            )
        {
            var page = await _dal.QueryPageList(
                whereExpression,
                pageIndex, pageSize,
                    sortField, sortOrder);
            return page;
        }



        public async Task<List<Sys_Dept_ComProPageDto>> GetList_ComPro(
                Expression<Func<Sys_Dept, bool>> whereExpression,
                string sortField = null, string sortOrder = null
        )
        {
            var page = await _dal.GetList_ComPro(whereExpression, sortField, sortOrder);
            return page;
        }





    }
}

